package com.problem.leetcode;

/**
 * @author didi
 * @DESCRIPTION
 * @create 2019-04-05 01:06
 **/

public class Problem70 {
    public static void main(String[] args) {
        Problem70 problem70 = new Problem70();
        int       c         = problem70.test(5);
        System.out.println(c);
    }

    private int test(int n) {
        int a = 0;
        int b = 1;
        int c = a + b;
        for (int i = 1; i < n; i++) {
            a = b;
            b = c;
            c = a + b;
        }
        return c;
    }

}
